package edu.ycu.aladdin.collector.weibo;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author <a href="mailto:wangruihuan@abitai.com">王瑞环</a>
 * @since 2019-01-08 9:04 PM
 */
@Data
@Component
@ConfigurationProperties(prefix = "weibo")
public class WeiBoConfig {

    private String url;

    public  String replaceParams(String value, String containerid, int page) {
        return url.replace("{{uid}}", value)
                .replace("{{containerid}}", containerid)
                .replace("{{page}}", String.valueOf(page));
    }

}
